// $ANTLR 3.0.1 C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g 2008-09-18 21:03:08

package ac.jp.u_tokyo.SyncLib.language3;
import java.util.LinkedList;
import java.util.List;
import ac.jp.u_tokyo.SyncLib.language.*;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;

public class LanguageParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "CONST", "TRUE", "FALSE", "NULL", "FOR", "IN", "VAR", "DIGIT", "ULETTER", "LLETTER", "LETTER", "NUMBER", "NAME", "STRING", "COMMENT", "LINE_COMMENT", "WS", "INCLUDE", "'<'", "','", "'>'", "'='", "'('", "')'", "'{'", "';'", "'|'", "'}'", "'.'", "'!'", "'=='", "'<>'", "'['", "']'"
    };
    public static final int ULETTER=12;
    public static final int LINE_COMMENT=19;
    public static final int LETTER=14;
    public static final int CONST=4;
    public static final int NULL=7;
    public static final int NUMBER=15;
    public static final int FOR=8;
    public static final int EOF=-1;
    public static final int TRUE=5;
    public static final int LLETTER=13;
    public static final int NAME=16;
    public static final int WS=20;
    public static final int IN=9;
    public static final int INCLUDE=21;
    public static final int VAR=10;
    public static final int DIGIT=11;
    public static final int COMMENT=18;
    public static final int FALSE=6;
    public static final int STRING=17;

        public LanguageParser(TokenStream input) {
            super(input);
        }
        

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g"; }

    
    	HigherProgram _program;
    	public static class CustomMsgException extends RecognitionException {
    		private String message;
    		public String getMessage() {
    			return message;
    		}
    		public CustomMsgException(String msg, int line, int charPositionInLine) {
    			message = msg;
        		super.line = line;
        		super.charPositionInLine = charPositionInLine;
        	}
    		public CustomMsgException(String msg, IntStream stream) {
    			super(stream);
    			message = msg;
    		}
    	}
    	
    	public void displayRecognitionError(String as[], RecognitionException exp) {
    		if (exp instanceof CustomMsgException)
    			emitErrorMessage(getErrorHeader(exp) + " " + ((CustomMsgException)exp).getMessage());
    		else
    			super.displayRecognitionError(as, exp);
    	}
    	
    



    // $ANTLR start prog
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:148:1: prog returns [HigherProgram result] : synchronizer_decls EOF ;
    public final HigherProgram prog() throws RecognitionException {
        HigherProgram result = null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:149:3: ( synchronizer_decls EOF )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:149:5: synchronizer_decls EOF
            {
            _program = new HigherProgram();
            pushFollow(FOLLOW_synchronizer_decls_in_prog412);
            synchronizer_decls();
            _fsp--;

            match(input,EOF,FOLLOW_EOF_in_prog414); 
            result = _program;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end prog


    // $ANTLR start synchronizer_decls
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:150:1: synchronizer_decls : s1= synchronizer_decl ( synchronizer_decls )? ;
    public final void synchronizer_decls() throws RecognitionException {
        HigherSyncDecl s1 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:151:2: (s1= synchronizer_decl ( synchronizer_decls )? )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:151:4: s1= synchronizer_decl ( synchronizer_decls )?
            {
            pushFollow(FOLLOW_synchronizer_decl_in_synchronizer_decls427);
            s1=synchronizer_decl();
            _fsp--;

            _program.addDecl(s1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:153:2: ( synchronizer_decls )?
            int alt1=2;
            int LA1_0 = input.LA(1);

            if ( (LA1_0==NAME) ) {
                alt1=1;
            }
            switch (alt1) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:153:3: synchronizer_decls
                    {
                    pushFollow(FOLLOW_synchronizer_decls_in_synchronizer_decls436);
                    synchronizer_decls();
                    _fsp--;


                    }
                    break;

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end synchronizer_decls


    // $ANTLR start synchronizer_decl
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:155:1: synchronizer_decl returns [HigherSyncDecl result] : NAME ( generic_para_list[$result] )? para_list[$result] bracket_sync ;
    public final HigherSyncDecl synchronizer_decl() throws RecognitionException {
        HigherSyncDecl result = null;

        Token NAME1=null;
        BracketSync bracket_sync2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:156:2: ( NAME ( generic_para_list[$result] )? para_list[$result] bracket_sync )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:156:4: NAME ( generic_para_list[$result] )? para_list[$result] bracket_sync
            {
            NAME1=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_synchronizer_decl452); 
            result = new HigherSyncDecl(NAME1.getLine());
            	 result.setName(NAME1.getText());
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:159:2: ( generic_para_list[$result] )?
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==22) ) {
                alt2=1;
            }
            switch (alt2) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:159:3: generic_para_list[$result]
                    {
                    pushFollow(FOLLOW_generic_para_list_in_synchronizer_decl459);
                    generic_para_list(result);
                    _fsp--;


                    }
                    break;

            }

            pushFollow(FOLLOW_para_list_in_synchronizer_decl464);
            para_list(result);
            _fsp--;

            pushFollow(FOLLOW_bracket_sync_in_synchronizer_decl470);
            bracket_sync2=bracket_sync();
            _fsp--;

            result.setSync(bracket_sync2);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end synchronizer_decl


    // $ANTLR start generic_para_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:162:1: generic_para_list[HigherSyncDecl decl] : '<' generic_para_decl[decl] ( ',' generic_para_decl[decl] )* '>' ;
    public final void generic_para_list(HigherSyncDecl decl) throws RecognitionException {
        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:163:2: ( '<' generic_para_decl[decl] ( ',' generic_para_decl[decl] )* '>' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:163:4: '<' generic_para_decl[decl] ( ',' generic_para_decl[decl] )* '>'
            {
            match(input,22,FOLLOW_22_in_generic_para_list483); 
            pushFollow(FOLLOW_generic_para_decl_in_generic_para_list485);
            generic_para_decl(decl);
            _fsp--;

            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:163:32: ( ',' generic_para_decl[decl] )*
            loop3:
            do {
                int alt3=2;
                int LA3_0 = input.LA(1);

                if ( (LA3_0==23) ) {
                    alt3=1;
                }


                switch (alt3) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:163:33: ',' generic_para_decl[decl]
            	    {
            	    match(input,23,FOLLOW_23_in_generic_para_list489); 
            	    pushFollow(FOLLOW_generic_para_decl_in_generic_para_list491);
            	    generic_para_decl(decl);
            	    _fsp--;


            	    }
            	    break;

            	default :
            	    break loop3;
                }
            } while (true);

            match(input,24,FOLLOW_24_in_generic_para_list496); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end generic_para_list


    // $ANTLR start generic_para_decl
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:165:1: generic_para_decl[HigherSyncDecl decl] : NAME ( '=' const_value )? ;
    public final void generic_para_decl(HigherSyncDecl decl) throws RecognitionException {
        Token NAME4=null;
        Const const_value3 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:166:2: ( NAME ( '=' const_value )? )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:166:4: NAME ( '=' const_value )?
            {
            Const defaultValue = null;
            NAME4=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_generic_para_decl511); 
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:167:7: ( '=' const_value )?
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==25) ) {
                alt4=1;
            }
            switch (alt4) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:167:8: '=' const_value
                    {
                    match(input,25,FOLLOW_25_in_generic_para_decl514); 
                    pushFollow(FOLLOW_const_value_in_generic_para_decl516);
                    const_value3=const_value();
                    _fsp--;

                    defaultValue = const_value3;

                    }
                    break;

            }

             decl.addGenericParameter(NAME4.getText(), defaultValue, NAME4.getLine());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end generic_para_decl


    // $ANTLR start para_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:171:1: para_list[HigherSyncDecl decl] : '(' para[decl] ( ',' para[decl] )* ')' ;
    public final void para_list(HigherSyncDecl decl) throws RecognitionException {
        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:172:2: ( '(' para[decl] ( ',' para[decl] )* ')' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:172:4: '(' para[decl] ( ',' para[decl] )* ')'
            {
            match(input,26,FOLLOW_26_in_para_list537); 
            pushFollow(FOLLOW_para_in_para_list539);
            para(decl);
            _fsp--;

            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:172:19: ( ',' para[decl] )*
            loop5:
            do {
                int alt5=2;
                int LA5_0 = input.LA(1);

                if ( (LA5_0==23) ) {
                    alt5=1;
                }


                switch (alt5) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:172:20: ',' para[decl]
            	    {
            	    match(input,23,FOLLOW_23_in_para_list543); 
            	    pushFollow(FOLLOW_para_in_para_list545);
            	    para(decl);
            	    _fsp--;


            	    }
            	    break;

            	default :
            	    break loop5;
                }
            } while (true);

            match(input,27,FOLLOW_27_in_para_list550); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end para_list


    // $ANTLR start para
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:174:1: para[HigherSyncDecl decl] : var ;
    public final void para(HigherSyncDecl decl) throws RecognitionException {
        Var var5 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:175:3: ( var )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:175:5: var
            {
            pushFollow(FOLLOW_var_in_para562);
            var5=var();
            _fsp--;

            decl.addVar(var5);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end para


    // $ANTLR start bracket_sync
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:189:1: bracket_sync returns [BracketSync result] : start= '{' ( var_decl[conjunction] )? ( sync ( ';' | ( '|' ) )? )* '}' ;
    public final BracketSync bracket_sync() throws RecognitionException {
        BracketSync result = null;

        Token start=null;
        SyncConstruct sync6 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:190:2: (start= '{' ( var_decl[conjunction] )? ( sync ( ';' | ( '|' ) )? )* '}' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:190:4: start= '{' ( var_decl[conjunction] )? ( sync ( ';' | ( '|' ) )? )* '}'
            {
            start=(Token)input.LT(1);
            match(input,28,FOLLOW_28_in_bracket_sync583); 
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:191:2: ( var_decl[conjunction] )?
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==VAR) ) {
                alt6=1;
            }
            switch (alt6) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:192:3: var_decl[conjunction]
                    {
                    Conjunction conjunction = new Conjunction(start.getLine()); result = conjunction;
                    pushFollow(FOLLOW_var_decl_in_bracket_sync596);
                    var_decl(conjunction);
                    _fsp--;


                    }
                    break;

            }

            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:195:2: ( sync ( ';' | ( '|' ) )? )*
            loop8:
            do {
                int alt8=2;
                int LA8_0 = input.LA(1);

                if ( (LA8_0==FOR||LA8_0==NAME||LA8_0==28||LA8_0==33) ) {
                    alt8=1;
                }


                switch (alt8) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:196:3: sync ( ';' | ( '|' ) )?
            	    {
            	    pushFollow(FOLLOW_sync_in_bracket_sync610);
            	    sync6=sync();
            	    _fsp--;

            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:197:3: ( ';' | ( '|' ) )?
            	    int alt7=3;
            	    int LA7_0 = input.LA(1);

            	    if ( (LA7_0==29) ) {
            	        alt7=1;
            	    }
            	    else if ( (LA7_0==30) ) {
            	        alt7=2;
            	    }
            	    switch (alt7) {
            	        case 1 :
            	            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:197:4: ';'
            	            {
            	            match(input,29,FOLLOW_29_in_bracket_sync616); 

            	            }
            	            break;
            	        case 2 :
            	            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:197:10: ( '|' )
            	            {
            	            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:197:10: ( '|' )
            	            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:197:11: '|'
            	            {
            	            match(input,30,FOLLOW_30_in_bracket_sync621); 
            	            if (result == null) result = new Disjunction(start.getLine());

            	            }


            	            }
            	            break;

            	    }

            	    
            	    		 	if (result == null) result = new Conjunction(start.getLine());
            	    		  	result.addInner(sync6);
            	    		 

            	    }
            	    break;

            	default :
            	    break loop8;
                }
            } while (true);

            match(input,31,FOLLOW_31_in_bracket_sync639); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end bracket_sync


    // $ANTLR start single_sync
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:205:1: single_sync returns [SyncConstruct result] : ( sync_ref | map | expr );
    public final SyncConstruct single_sync() throws RecognitionException {
        SyncConstruct result = null;

        SyncRefConstruct sync_ref7 = null;

        ForMap map8 = null;

        SyncConstruct expr9 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:206:2: ( sync_ref | map | expr )
            int alt9=3;
            switch ( input.LA(1) ) {
            case NAME:
                {
                int LA9_1 = input.LA(2);

                if ( (LA9_1==22||LA9_1==26) ) {
                    alt9=1;
                }
                else if ( (LA9_1==25||LA9_1==32||(LA9_1>=34 && LA9_1<=35)) ) {
                    alt9=3;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("205:1: single_sync returns [SyncConstruct result] : ( sync_ref | map | expr );", 9, 1, input);

                    throw nvae;
                }
                }
                break;
            case FOR:
                {
                alt9=2;
                }
                break;
            case 33:
                {
                alt9=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("205:1: single_sync returns [SyncConstruct result] : ( sync_ref | map | expr );", 9, 0, input);

                throw nvae;
            }

            switch (alt9) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:206:4: sync_ref
                    {
                    pushFollow(FOLLOW_sync_ref_in_single_sync653);
                    sync_ref7=sync_ref();
                    _fsp--;

                    result = sync_ref7;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:207:4: map
                    {
                    pushFollow(FOLLOW_map_in_single_sync660);
                    map8=map();
                    _fsp--;

                    result = map8;

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:208:4: expr
                    {
                    pushFollow(FOLLOW_expr_in_single_sync667);
                    expr9=expr();
                    _fsp--;

                    result = expr9;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end single_sync


    // $ANTLR start sync
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:209:1: sync returns [SyncConstruct result] : ( bracket_sync | single_sync );
    public final SyncConstruct sync() throws RecognitionException {
        SyncConstruct result = null;

        BracketSync bracket_sync10 = null;

        SyncConstruct single_sync11 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:210:2: ( bracket_sync | single_sync )
            int alt10=2;
            int LA10_0 = input.LA(1);

            if ( (LA10_0==28) ) {
                alt10=1;
            }
            else if ( (LA10_0==FOR||LA10_0==NAME||LA10_0==33) ) {
                alt10=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("209:1: sync returns [SyncConstruct result] : ( bracket_sync | single_sync );", 10, 0, input);

                throw nvae;
            }
            switch (alt10) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:210:4: bracket_sync
                    {
                    pushFollow(FOLLOW_bracket_sync_in_sync681);
                    bracket_sync10=bracket_sync();
                    _fsp--;

                    result = bracket_sync10;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:211:4: single_sync
                    {
                    pushFollow(FOLLOW_single_sync_in_sync688);
                    single_sync11=single_sync();
                    _fsp--;

                    result = single_sync11;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end sync


    // $ANTLR start var_decl
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:227:1: var_decl[Conjunction c] : VAR v1= var ( ',' v2= var )* ';' ;
    public final void var_decl(Conjunction c) throws RecognitionException {
        Var v1 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:228:2: ( VAR v1= var ( ',' v2= var )* ';' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:228:4: VAR v1= var ( ',' v2= var )* ';'
            {
            match(input,VAR,FOLLOW_VAR_in_var_decl710); 
            pushFollow(FOLLOW_var_in_var_decl714);
            v1=var();
            _fsp--;

            c.addVar(v1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:228:30: ( ',' v2= var )*
            loop11:
            do {
                int alt11=2;
                int LA11_0 = input.LA(1);

                if ( (LA11_0==23) ) {
                    alt11=1;
                }


                switch (alt11) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:228:31: ',' v2= var
            	    {
            	    match(input,23,FOLLOW_23_in_var_decl718); 
            	    pushFollow(FOLLOW_var_in_var_decl722);
            	    v2=var();
            	    _fsp--;

            	    c.addVar(v2);

            	    }
            	    break;

            	default :
            	    break loop11;
                }
            } while (true);

            match(input,29,FOLLOW_29_in_var_decl728); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end var_decl


    // $ANTLR start sync_ref
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:230:1: sync_ref returns [SyncRefConstruct result] : NAME ( generic_arg_list[$result] )? var_list[$result] ;
    public final SyncRefConstruct sync_ref() throws RecognitionException {
        SyncRefConstruct result = null;

        Token NAME12=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:231:2: ( NAME ( generic_arg_list[$result] )? var_list[$result] )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:231:4: NAME ( generic_arg_list[$result] )? var_list[$result]
            {
            NAME12=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_sync_ref741); 
             result = new SyncRefConstruct(NAME12.getLine(), _program.getLowerProgram());
            	  result.setName(NAME12.getText());
            	
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:235:3: ( generic_arg_list[$result] )?
            int alt12=2;
            int LA12_0 = input.LA(1);

            if ( (LA12_0==22) ) {
                alt12=1;
            }
            switch (alt12) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:235:3: generic_arg_list[$result]
                    {
                    pushFollow(FOLLOW_generic_arg_list_in_sync_ref748);
                    generic_arg_list(result);
                    _fsp--;


                    }
                    break;

            }

            pushFollow(FOLLOW_var_list_in_sync_ref752);
            var_list(result);
            _fsp--;


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end sync_ref


    // $ANTLR start generic_arg_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:237:1: generic_arg_list[SyncRefConstruct c] : '<' n1= NAME '=' c1= const_value ( ',' n2= NAME '=' c2= const_value )* '>' ;
    public final void generic_arg_list(SyncRefConstruct c) throws RecognitionException {
        Token n1=null;
        Token n2=null;
        Const c1 = null;

        Const c2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:238:2: ( '<' n1= NAME '=' c1= const_value ( ',' n2= NAME '=' c2= const_value )* '>' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:238:4: '<' n1= NAME '=' c1= const_value ( ',' n2= NAME '=' c2= const_value )* '>'
            {
            match(input,22,FOLLOW_22_in_generic_arg_list763); 
            n1=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_generic_arg_list767); 
            match(input,25,FOLLOW_25_in_generic_arg_list769); 
            pushFollow(FOLLOW_const_value_in_generic_arg_list773);
            c1=const_value();
            _fsp--;

            c.addGenericArg(n1.getText(), c1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:239:2: ( ',' n2= NAME '=' c2= const_value )*
            loop13:
            do {
                int alt13=2;
                int LA13_0 = input.LA(1);

                if ( (LA13_0==23) ) {
                    alt13=1;
                }


                switch (alt13) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:239:3: ',' n2= NAME '=' c2= const_value
            	    {
            	    match(input,23,FOLLOW_23_in_generic_arg_list780); 
            	    n2=(Token)input.LT(1);
            	    match(input,NAME,FOLLOW_NAME_in_generic_arg_list784); 
            	    match(input,25,FOLLOW_25_in_generic_arg_list786); 
            	    pushFollow(FOLLOW_const_value_in_generic_arg_list790);
            	    c2=const_value();
            	    _fsp--;

            	    c.addGenericArg(n2.getText(), c2);

            	    }
            	    break;

            	default :
            	    break loop13;
                }
            } while (true);

            match(input,24,FOLLOW_24_in_generic_arg_list798); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end generic_arg_list


    // $ANTLR start var_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:242:1: var_list[SyncRefConstruct c] : '(' v1= var ( ',' v2= var )* ')' ;
    public final void var_list(SyncRefConstruct c) throws RecognitionException {
        Var v1 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:243:2: ( '(' v1= var ( ',' v2= var )* ')' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:243:4: '(' v1= var ( ',' v2= var )* ')'
            {
            match(input,26,FOLLOW_26_in_var_list809); 
            pushFollow(FOLLOW_var_in_var_list813);
            v1=var();
            _fsp--;

            c.addArg(v1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:244:2: ( ',' v2= var )*
            loop14:
            do {
                int alt14=2;
                int LA14_0 = input.LA(1);

                if ( (LA14_0==23) ) {
                    alt14=1;
                }


                switch (alt14) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:244:3: ',' v2= var
            	    {
            	    match(input,23,FOLLOW_23_in_var_list820); 
            	    pushFollow(FOLLOW_var_in_var_list824);
            	    v2=var();
            	    _fsp--;

            	    c.addArg(v2);

            	    }
            	    break;

            	default :
            	    break loop14;
                }
            } while (true);

            match(input,27,FOLLOW_27_in_var_list830); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end var_list


    // $ANTLR start expr
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:246:1: expr returns [SyncConstruct result] : (e1= varexpr | v1= var ) op (e2= varexpr | NAME | const_value_no_ref ) ;
    public final SyncConstruct expr() throws RecognitionException {
        SyncConstruct result = null;

        Token NAME14=null;
        VarExpr e1 = null;

        Var v1 = null;

        VarExpr e2 = null;

        op_return op13 = null;

        Const const_value_no_ref15 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:247:2: ( (e1= varexpr | v1= var ) op (e2= varexpr | NAME | const_value_no_ref ) )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:247:5: (e1= varexpr | v1= var ) op (e2= varexpr | NAME | const_value_no_ref )
            {
            Part left = null; VarExprPart leftVarExpr = null; VarExpr rightExpr = null; String rightRef = null; Const rightConst = null;
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:248:2: (e1= varexpr | v1= var )
            int alt15=2;
            int LA15_0 = input.LA(1);

            if ( (LA15_0==NAME) ) {
                int LA15_1 = input.LA(2);

                if ( (LA15_1==25||(LA15_1>=34 && LA15_1<=35)) ) {
                    alt15=2;
                }
                else if ( (LA15_1==32) ) {
                    alt15=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("248:2: (e1= varexpr | v1= var )", 15, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA15_0==33) ) {
                alt15=1;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("248:2: (e1= varexpr | v1= var )", 15, 0, input);

                throw nvae;
            }
            switch (alt15) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:248:4: e1= varexpr
                    {
                    pushFollow(FOLLOW_varexpr_in_expr851);
                    e1=varexpr();
                    _fsp--;

                    leftVarExpr = new VarExprPart(e1, true);  left = leftVarExpr;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:249:6: v1= var
                    {
                    pushFollow(FOLLOW_var_in_expr863);
                    v1=var();
                    _fsp--;

                    left = new VarPart(v1);

                    }
                    break;

            }

            pushFollow(FOLLOW_op_in_expr872);
            op13=op();
            _fsp--;

             if (op13.result != ExprType.EQUAL && leftVarExpr != null) leftVarExpr.setAtLeft(false);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:252:2: (e2= varexpr | NAME | const_value_no_ref )
            int alt16=3;
            switch ( input.LA(1) ) {
            case NAME:
                {
                int LA16_1 = input.LA(2);

                if ( (LA16_1==FOR||LA16_1==NAME||(LA16_1>=28 && LA16_1<=31)||LA16_1==33) ) {
                    alt16=2;
                }
                else if ( (LA16_1==32) ) {
                    alt16=1;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("252:2: (e2= varexpr | NAME | const_value_no_ref )", 16, 1, input);

                    throw nvae;
                }
                }
                break;
            case 33:
                {
                alt16=1;
                }
                break;
            case TRUE:
            case FALSE:
            case NULL:
            case NUMBER:
            case STRING:
            case 36:
                {
                alt16=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("252:2: (e2= varexpr | NAME | const_value_no_ref )", 16, 0, input);

                throw nvae;
            }

            switch (alt16) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:252:4: e2= varexpr
                    {
                    pushFollow(FOLLOW_varexpr_in_expr881);
                    e2=varexpr();
                    _fsp--;

                     rightExpr = e2;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:253:6: NAME
                    {
                    NAME14=(Token)input.LT(1);
                    match(input,NAME,FOLLOW_NAME_in_expr891); 
                    rightRef = NAME14.getText();

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:254:6: const_value_no_ref
                    {
                    pushFollow(FOLLOW_const_value_no_ref_in_expr902);
                    const_value_no_ref15=const_value_no_ref();
                    _fsp--;

                    rightConst = const_value_no_ref15;

                    }
                    break;

            }

             result = Helper.constructExpr(op13.line, left, rightExpr, rightRef, rightConst, op13.result);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end expr


    // $ANTLR start varexpr
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:259:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );
    public final VarExpr varexpr() throws RecognitionException {
        VarExpr result = null;

        Var v1 = null;

        Const c1 = null;

        Var v2 = null;

        Var v3 = null;

        Var v4 = null;

        Var v5 = null;

        Var v6 = null;

        Var v7 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:260:2: (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var )
            int alt17=4;
            int LA17_0 = input.LA(1);

            if ( (LA17_0==NAME) ) {
                int LA17_1 = input.LA(2);

                if ( (LA17_1==32) ) {
                    int LA17_3 = input.LA(3);

                    if ( (LA17_3==33) ) {
                        alt17=2;
                    }
                    else if ( ((LA17_3>=TRUE && LA17_3<=NULL)||(LA17_3>=NUMBER && LA17_3<=STRING)||LA17_3==36) ) {
                        alt17=1;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("259:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 17, 3, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("259:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 17, 1, input);

                    throw nvae;
                }
            }
            else if ( (LA17_0==33) ) {
                int LA17_2 = input.LA(2);

                if ( (LA17_2==NAME) ) {
                    int LA17_4 = input.LA(3);

                    if ( (LA17_4==32) ) {
                        int LA17_13 = input.LA(4);

                        if ( (LA17_13==33) ) {
                            alt17=4;
                        }
                        else if ( (LA17_13==NAME) ) {
                            alt17=3;
                        }
                        else {
                            NoViableAltException nvae =
                                new NoViableAltException("259:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 17, 13, input);

                            throw nvae;
                        }
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("259:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 17, 4, input);

                        throw nvae;
                    }
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("259:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 17, 2, input);

                    throw nvae;
                }
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("259:1: varexpr returns [VarExpr result] : (v1= var '.' c1= const_value | v2= var '.' '!' v3= var | '!' v4= var '.' v5= var | '!' v6= var '.' '!' v7= var );", 17, 0, input);

                throw nvae;
            }
            switch (alt17) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:260:4: v1= var '.' c1= const_value
                    {
                    pushFollow(FOLLOW_var_in_varexpr928);
                    v1=var();
                    _fsp--;

                    match(input,32,FOLLOW_32_in_varexpr930); 
                    pushFollow(FOLLOW_const_value_in_varexpr934);
                    c1=const_value();
                    _fsp--;

                    SGetExpr s = new SGetExpr(v1.getLine()); s.setKey(c1); s.setDict(v1); result =s;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:262:4: v2= var '.' '!' v3= var
                    {
                    pushFollow(FOLLOW_var_in_varexpr946);
                    v2=var();
                    _fsp--;

                    match(input,32,FOLLOW_32_in_varexpr948); 
                    match(input,33,FOLLOW_33_in_varexpr950); 
                    pushFollow(FOLLOW_var_in_varexpr954);
                    v3=var();
                    _fsp--;

                    result = new KVDGetExpr(v2.getLine(), v2, v3);

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:263:4: '!' v4= var '.' v5= var
                    {
                    match(input,33,FOLLOW_33_in_varexpr962); 
                    pushFollow(FOLLOW_var_in_varexpr966);
                    v4=var();
                    _fsp--;

                    match(input,32,FOLLOW_32_in_varexpr968); 
                    pushFollow(FOLLOW_var_in_varexpr972);
                    v5=var();
                    _fsp--;

                    result = new DVDGetExpr(v4.getLine(), v4, v5);

                    }
                    break;
                case 4 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:264:4: '!' v6= var '.' '!' v7= var
                    {
                    match(input,33,FOLLOW_33_in_varexpr979); 
                    pushFollow(FOLLOW_var_in_varexpr983);
                    v6=var();
                    _fsp--;

                    match(input,32,FOLLOW_32_in_varexpr985); 
                    match(input,33,FOLLOW_33_in_varexpr987); 
                    pushFollow(FOLLOW_var_in_varexpr991);
                    v7=var();
                    _fsp--;

                    result = new KDVDGetExpr(v6.getLine(), v6, v7);

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end varexpr

    public static class op_return extends ParserRuleReturnScope {
        public ExprType result;
        public int line;
    };

    // $ANTLR start op
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:266:1: op returns [ExprType result, int line] : (c1= '=' | c2= '==' | c3= '<>' );
    public final op_return op() throws RecognitionException {
        op_return retval = new op_return();
        retval.start = input.LT(1);

        Token c1=null;
        Token c2=null;
        Token c3=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:267:2: (c1= '=' | c2= '==' | c3= '<>' )
            int alt18=3;
            switch ( input.LA(1) ) {
            case 25:
                {
                alt18=1;
                }
                break;
            case 34:
                {
                alt18=2;
                }
                break;
            case 35:
                {
                alt18=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("266:1: op returns [ExprType result, int line] : (c1= '=' | c2= '==' | c3= '<>' );", 18, 0, input);

                throw nvae;
            }

            switch (alt18) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:267:4: c1= '='
                    {
                    c1=(Token)input.LT(1);
                    match(input,25,FOLLOW_25_in_op1009); 
                    retval.result = ExprType.EQUAL; retval.line =c1.getLine();

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:268:4: c2= '=='
                    {
                    c2=(Token)input.LT(1);
                    match(input,34,FOLLOW_34_in_op1019); 
                    retval.result = ExprType.TESTEQUAL; retval.line =c2.getLine();

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:269:4: c3= '<>'
                    {
                    c3=(Token)input.LT(1);
                    match(input,35,FOLLOW_35_in_op1028); 
                    retval.result = ExprType.NOTEQUAL;retval.line =c3.getLine();

                    }
                    break;

            }
            retval.stop = input.LT(-1);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end op


    // $ANTLR start map
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:271:1: map returns [ForMap result] : FOR map_var_list[$result] IN dict_list[$result] sync ;
    public final ForMap map() throws RecognitionException {
        ForMap result = null;

        Token FOR16=null;
        SyncConstruct sync17 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:272:2: ( FOR map_var_list[$result] IN dict_list[$result] sync )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:272:4: FOR map_var_list[$result] IN dict_list[$result] sync
            {
            FOR16=(Token)input.LT(1);
            match(input,FOR,FOLLOW_FOR_in_map1044); 
            result = new ForMap(FOR16.getLine());
            pushFollow(FOLLOW_map_var_list_in_map1050);
            map_var_list(result);
            _fsp--;

            match(input,IN,FOLLOW_IN_in_map1056); 
            pushFollow(FOLLOW_dict_list_in_map1060);
            dict_list(result);
            _fsp--;

            pushFollow(FOLLOW_sync_in_map1065);
            sync17=sync();
            _fsp--;

            result.setSyncConstruct(sync17);

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end map


    // $ANTLR start map_var_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:278:1: map_var_list[ForMap c] : '[' entry_bind[c] ( ',' entry_bind[c] )* ']' ;
    public final void map_var_list(ForMap c) throws RecognitionException {
        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:279:2: ( '[' entry_bind[c] ( ',' entry_bind[c] )* ']' )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:279:4: '[' entry_bind[c] ( ',' entry_bind[c] )* ']'
            {
            match(input,36,FOLLOW_36_in_map_var_list1077); 
            pushFollow(FOLLOW_entry_bind_in_map_var_list1079);
            entry_bind(c);
            _fsp--;

            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:279:22: ( ',' entry_bind[c] )*
            loop19:
            do {
                int alt19=2;
                int LA19_0 = input.LA(1);

                if ( (LA19_0==23) ) {
                    alt19=1;
                }


                switch (alt19) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:279:23: ',' entry_bind[c]
            	    {
            	    match(input,23,FOLLOW_23_in_map_var_list1083); 
            	    pushFollow(FOLLOW_entry_bind_in_map_var_list1085);
            	    entry_bind(c);
            	    _fsp--;


            	    }
            	    break;

            	default :
            	    break loop19;
                }
            } while (true);

            match(input,37,FOLLOW_37_in_map_var_list1090); 

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end map_var_list


    // $ANTLR start entry_bind
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:281:1: entry_bind[ForMap c] : (v1= var | '<' k2= var ',' v2= var '>' );
    public final void entry_bind(ForMap c) throws RecognitionException {
        Var v1 = null;

        Var k2 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:282:2: (v1= var | '<' k2= var ',' v2= var '>' )
            int alt20=2;
            int LA20_0 = input.LA(1);

            if ( (LA20_0==NAME) ) {
                alt20=1;
            }
            else if ( (LA20_0==22) ) {
                alt20=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("281:1: entry_bind[ForMap c] : (v1= var | '<' k2= var ',' v2= var '>' );", 20, 0, input);

                throw nvae;
            }
            switch (alt20) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:282:4: v1= var
                    {
                    pushFollow(FOLLOW_var_in_entry_bind1103);
                    v1=var();
                    _fsp--;

                    c.addValueBinding(v1);

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:283:4: '<' k2= var ',' v2= var '>'
                    {
                    match(input,22,FOLLOW_22_in_entry_bind1111); 
                    pushFollow(FOLLOW_var_in_entry_bind1115);
                    k2=var();
                    _fsp--;

                    match(input,23,FOLLOW_23_in_entry_bind1117); 
                    pushFollow(FOLLOW_var_in_entry_bind1121);
                    v2=var();
                    _fsp--;

                    match(input,24,FOLLOW_24_in_entry_bind1123); 
                    c.addPairBinding(k2, v2);

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end entry_bind


    // $ANTLR start dict_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:285:1: dict_list[ForMap c] : ( '[' | '<' ) v1= var ( ',' v2= var )* ( '>' | ']' ) ;
    public final void dict_list(ForMap c) throws RecognitionException {
        Var v1 = null;

        Var v2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:286:2: ( ( '[' | '<' ) v1= var ( ',' v2= var )* ( '>' | ']' ) )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:286:4: ( '[' | '<' ) v1= var ( ',' v2= var )* ( '>' | ']' )
            {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:286:4: ( '[' | '<' )
            int alt21=2;
            int LA21_0 = input.LA(1);

            if ( (LA21_0==36) ) {
                alt21=1;
            }
            else if ( (LA21_0==22) ) {
                alt21=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("286:4: ( '[' | '<' )", 21, 0, input);

                throw nvae;
            }
            switch (alt21) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:286:5: '['
                    {
                    match(input,36,FOLLOW_36_in_dict_list1137); 
                    c.setEqualMap(true);

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:286:34: '<'
                    {
                    match(input,22,FOLLOW_22_in_dict_list1143); 
                    c.setEqualMap(false);

                    }
                    break;

            }

            pushFollow(FOLLOW_var_in_dict_list1151);
            v1=var();
            _fsp--;

            c.addDictionary(v1);
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:288:2: ( ',' v2= var )*
            loop22:
            do {
                int alt22=2;
                int LA22_0 = input.LA(1);

                if ( (LA22_0==23) ) {
                    alt22=1;
                }


                switch (alt22) {
            	case 1 :
            	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:288:3: ',' v2= var
            	    {
            	    match(input,23,FOLLOW_23_in_dict_list1158); 
            	    pushFollow(FOLLOW_var_in_dict_list1162);
            	    v2=var();
            	    _fsp--;

            	    c.addDictionary(v2);

            	    }
            	    break;

            	default :
            	    break loop22;
                }
            } while (true);

            if ( input.LA(1)==24||input.LA(1)==37 ) {
                input.consume();
                errorRecovery=false;
            }
            else {
                MismatchedSetException mse =
                    new MismatchedSetException(null,input);
                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_dict_list1170);    throw mse;
            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return ;
    }
    // $ANTLR end dict_list


    // $ANTLR start var
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:292:1: var returns [Var result] : NAME ;
    public final Var var() throws RecognitionException {
        Var result = null;

        Token NAME18=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:293:2: ( NAME )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:293:4: NAME
            {
            NAME18=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_var1191); 
            result = new Var(NAME18.getText(), NAME18.getLine());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end var


    // $ANTLR start const_value
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:295:1: const_value returns [Const result] : ( value_ref | const_value_no_ref );
    public final Const const_value() throws RecognitionException {
        Const result = null;

        ConstRef value_ref19 = null;

        Const const_value_no_ref20 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:296:2: ( value_ref | const_value_no_ref )
            int alt23=2;
            int LA23_0 = input.LA(1);

            if ( (LA23_0==NAME) ) {
                alt23=1;
            }
            else if ( ((LA23_0>=TRUE && LA23_0<=NULL)||LA23_0==NUMBER||LA23_0==STRING||LA23_0==36) ) {
                alt23=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("295:1: const_value returns [Const result] : ( value_ref | const_value_no_ref );", 23, 0, input);

                throw nvae;
            }
            switch (alt23) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:296:4: value_ref
                    {
                    pushFollow(FOLLOW_value_ref_in_const_value1206);
                    value_ref19=value_ref();
                    _fsp--;

                    result = value_ref19;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:297:4: const_value_no_ref
                    {
                    pushFollow(FOLLOW_const_value_no_ref_in_const_value1213);
                    const_value_no_ref20=const_value_no_ref();
                    _fsp--;

                    result = const_value_no_ref20;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end const_value


    // $ANTLR start const_value_no_ref
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:299:1: const_value_no_ref returns [Const result] : ( boolean_value | string | NUMBER | NULL | '[' value_list ']' );
    public final Const const_value_no_ref() throws RecognitionException {
        Const result = null;

        Token NUMBER23=null;
        Token NULL24=null;
        BooleanConst boolean_value21 = null;

        string_return string22 = null;

        ArrayConst value_list25 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:300:2: ( boolean_value | string | NUMBER | NULL | '[' value_list ']' )
            int alt24=5;
            switch ( input.LA(1) ) {
            case TRUE:
            case FALSE:
                {
                alt24=1;
                }
                break;
            case STRING:
                {
                alt24=2;
                }
                break;
            case NUMBER:
                {
                alt24=3;
                }
                break;
            case NULL:
                {
                alt24=4;
                }
                break;
            case 36:
                {
                alt24=5;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("299:1: const_value_no_ref returns [Const result] : ( boolean_value | string | NUMBER | NULL | '[' value_list ']' );", 24, 0, input);

                throw nvae;
            }

            switch (alt24) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:300:4: boolean_value
                    {
                    pushFollow(FOLLOW_boolean_value_in_const_value_no_ref1229);
                    boolean_value21=boolean_value();
                    _fsp--;

                    result = boolean_value21;

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:301:4: string
                    {
                    pushFollow(FOLLOW_string_in_const_value_no_ref1237);
                    string22=string();
                    _fsp--;

                    result = new StringConst(string22.line, string22.text);

                    }
                    break;
                case 3 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:302:4: NUMBER
                    {
                    NUMBER23=(Token)input.LT(1);
                    match(input,NUMBER,FOLLOW_NUMBER_in_const_value_no_ref1244); 
                    result = new IntegerConst(NUMBER23.getLine(), new Integer(NUMBER23.getText()));

                    }
                    break;
                case 4 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:303:4: NULL
                    {
                    NULL24=(Token)input.LT(1);
                    match(input,NULL,FOLLOW_NULL_in_const_value_no_ref1251); 
                    result = new NullConst(NULL24.getLine());

                    }
                    break;
                case 5 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:304:4: '[' value_list ']'
                    {
                    match(input,36,FOLLOW_36_in_const_value_no_ref1258); 
                    pushFollow(FOLLOW_value_list_in_const_value_no_ref1260);
                    value_list25=value_list();
                    _fsp--;

                    match(input,37,FOLLOW_37_in_const_value_no_ref1263); 
                    result = value_list25;

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end const_value_no_ref


    // $ANTLR start value_list
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:306:1: value_list returns [ArrayConst result] : (p1= const_value ( ',' p2= const_value )* )? ;
    public final ArrayConst value_list() throws RecognitionException {
        ArrayConst result = null;

        Const p1 = null;

        Const p2 = null;


        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:307:2: ( (p1= const_value ( ',' p2= const_value )* )? )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:308:2: (p1= const_value ( ',' p2= const_value )* )?
            {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:308:2: (p1= const_value ( ',' p2= const_value )* )?
            int alt26=2;
            int LA26_0 = input.LA(1);

            if ( ((LA26_0>=TRUE && LA26_0<=NULL)||(LA26_0>=NUMBER && LA26_0<=STRING)||LA26_0==36) ) {
                alt26=1;
            }
            switch (alt26) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:308:3: p1= const_value ( ',' p2= const_value )*
                    {
                    pushFollow(FOLLOW_const_value_in_value_list1283);
                    p1=const_value();
                    _fsp--;

                    result = new ArrayConst(p1.getLine());result.addInner(p1);
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:309:2: ( ',' p2= const_value )*
                    loop25:
                    do {
                        int alt25=2;
                        int LA25_0 = input.LA(1);

                        if ( (LA25_0==23) ) {
                            alt25=1;
                        }


                        switch (alt25) {
                    	case 1 :
                    	    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:309:3: ',' p2= const_value
                    	    {
                    	    match(input,23,FOLLOW_23_in_value_list1290); 
                    	    pushFollow(FOLLOW_const_value_in_value_list1294);
                    	    p2=const_value();
                    	    _fsp--;

                    	    result.addInner(p2);

                    	    }
                    	    break;

                    	default :
                    	    break loop25;
                        }
                    } while (true);


                    }
                    break;

            }


            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end value_list


    // $ANTLR start boolean_value
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:311:1: boolean_value returns [BooleanConst result] : ( TRUE | FALSE );
    public final BooleanConst boolean_value() throws RecognitionException {
        BooleanConst result = null;

        Token TRUE26=null;
        Token FALSE27=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:312:2: ( TRUE | FALSE )
            int alt27=2;
            int LA27_0 = input.LA(1);

            if ( (LA27_0==TRUE) ) {
                alt27=1;
            }
            else if ( (LA27_0==FALSE) ) {
                alt27=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("311:1: boolean_value returns [BooleanConst result] : ( TRUE | FALSE );", 27, 0, input);

                throw nvae;
            }
            switch (alt27) {
                case 1 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:312:4: TRUE
                    {
                    TRUE26=(Token)input.LT(1);
                    match(input,TRUE,FOLLOW_TRUE_in_boolean_value1313); 
                    result = new BooleanConst(TRUE26.getLine(), true);

                    }
                    break;
                case 2 :
                    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:313:4: FALSE
                    {
                    FALSE27=(Token)input.LT(1);
                    match(input,FALSE,FOLLOW_FALSE_in_boolean_value1320); 
                    result = new BooleanConst(FALSE27.getLine(), false);

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end boolean_value


    // $ANTLR start value_ref
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:315:1: value_ref returns [ConstRef result] : NAME ;
    public final ConstRef value_ref() throws RecognitionException {
        ConstRef result = null;

        Token NAME28=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:316:2: ( NAME )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:316:4: NAME
            {
            NAME28=(Token)input.LT(1);
            match(input,NAME,FOLLOW_NAME_in_value_ref1335); 
            result = new ConstRef(NAME28.getLine(), NAME28.getText());

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return result;
    }
    // $ANTLR end value_ref

    public static class string_return extends ParserRuleReturnScope {
        public String text;
        public int line;
    };

    // $ANTLR start string
    // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:318:1: string returns [String text, int line] : STRING ;
    public final string_return string() throws RecognitionException {
        string_return retval = new string_return();
        retval.start = input.LT(1);

        Token STRING29=null;

        try {
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:319:2: ( STRING )
            // C:\\Documents and Settings\\t2ladmin\\My Documents\\Projects\\2008\\OS3\\SyncLib\\src\\ac\\jp\\u_tokyo\\SyncLib\\language3\\Language.g:319:4: STRING
            {
            STRING29=(Token)input.LT(1);
            match(input,STRING,FOLLOW_STRING_in_string1350); 
            retval.text = STRING29.getText().substring(1, STRING29.getText().length() - 1); retval.line = STRING29.getLine();

            }

            retval.stop = input.LT(-1);

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
        }
        return retval;
    }
    // $ANTLR end string


 

    public static final BitSet FOLLOW_synchronizer_decls_in_prog412 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_prog414 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_synchronizer_decl_in_synchronizer_decls427 = new BitSet(new long[]{0x0000000000010002L});
    public static final BitSet FOLLOW_synchronizer_decls_in_synchronizer_decls436 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_synchronizer_decl452 = new BitSet(new long[]{0x0000000004400000L});
    public static final BitSet FOLLOW_generic_para_list_in_synchronizer_decl459 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_para_list_in_synchronizer_decl464 = new BitSet(new long[]{0x0000000010000000L});
    public static final BitSet FOLLOW_bracket_sync_in_synchronizer_decl470 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_22_in_generic_para_list483 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_generic_para_decl_in_generic_para_list485 = new BitSet(new long[]{0x0000000001800000L});
    public static final BitSet FOLLOW_23_in_generic_para_list489 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_generic_para_decl_in_generic_para_list491 = new BitSet(new long[]{0x0000000001800000L});
    public static final BitSet FOLLOW_24_in_generic_para_list496 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_generic_para_decl511 = new BitSet(new long[]{0x0000000002000002L});
    public static final BitSet FOLLOW_25_in_generic_para_decl514 = new BitSet(new long[]{0x00000010000380E0L});
    public static final BitSet FOLLOW_const_value_in_generic_para_decl516 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_para_list537 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_para_in_para_list539 = new BitSet(new long[]{0x0000000008800000L});
    public static final BitSet FOLLOW_23_in_para_list543 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_para_in_para_list545 = new BitSet(new long[]{0x0000000008800000L});
    public static final BitSet FOLLOW_27_in_para_list550 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_para562 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_28_in_bracket_sync583 = new BitSet(new long[]{0x0000000290010500L});
    public static final BitSet FOLLOW_var_decl_in_bracket_sync596 = new BitSet(new long[]{0x0000000290010100L});
    public static final BitSet FOLLOW_sync_in_bracket_sync610 = new BitSet(new long[]{0x00000002F0010100L});
    public static final BitSet FOLLOW_29_in_bracket_sync616 = new BitSet(new long[]{0x0000000290010100L});
    public static final BitSet FOLLOW_30_in_bracket_sync621 = new BitSet(new long[]{0x0000000290010100L});
    public static final BitSet FOLLOW_31_in_bracket_sync639 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_sync_ref_in_single_sync653 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_map_in_single_sync660 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_expr_in_single_sync667 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_bracket_sync_in_sync681 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_single_sync_in_sync688 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_VAR_in_var_decl710 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_decl714 = new BitSet(new long[]{0x0000000020800000L});
    public static final BitSet FOLLOW_23_in_var_decl718 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_decl722 = new BitSet(new long[]{0x0000000020800000L});
    public static final BitSet FOLLOW_29_in_var_decl728 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_sync_ref741 = new BitSet(new long[]{0x0000000004400000L});
    public static final BitSet FOLLOW_generic_arg_list_in_sync_ref748 = new BitSet(new long[]{0x0000000004000000L});
    public static final BitSet FOLLOW_var_list_in_sync_ref752 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_22_in_generic_arg_list763 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_NAME_in_generic_arg_list767 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_generic_arg_list769 = new BitSet(new long[]{0x00000010000380E0L});
    public static final BitSet FOLLOW_const_value_in_generic_arg_list773 = new BitSet(new long[]{0x0000000001800000L});
    public static final BitSet FOLLOW_23_in_generic_arg_list780 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_NAME_in_generic_arg_list784 = new BitSet(new long[]{0x0000000002000000L});
    public static final BitSet FOLLOW_25_in_generic_arg_list786 = new BitSet(new long[]{0x00000010000380E0L});
    public static final BitSet FOLLOW_const_value_in_generic_arg_list790 = new BitSet(new long[]{0x0000000001800000L});
    public static final BitSet FOLLOW_24_in_generic_arg_list798 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_var_list809 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_list813 = new BitSet(new long[]{0x0000000008800000L});
    public static final BitSet FOLLOW_23_in_var_list820 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_var_list824 = new BitSet(new long[]{0x0000000008800000L});
    public static final BitSet FOLLOW_27_in_var_list830 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_varexpr_in_expr851 = new BitSet(new long[]{0x0000000C02000000L});
    public static final BitSet FOLLOW_var_in_expr863 = new BitSet(new long[]{0x0000000C02000000L});
    public static final BitSet FOLLOW_op_in_expr872 = new BitSet(new long[]{0x00000012000380E0L});
    public static final BitSet FOLLOW_varexpr_in_expr881 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_expr891 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_const_value_no_ref_in_expr902 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_varexpr928 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_32_in_varexpr930 = new BitSet(new long[]{0x00000010000380E0L});
    public static final BitSet FOLLOW_const_value_in_varexpr934 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_varexpr946 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_32_in_varexpr948 = new BitSet(new long[]{0x0000000200000000L});
    public static final BitSet FOLLOW_33_in_varexpr950 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr954 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_33_in_varexpr962 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr966 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_32_in_varexpr968 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr972 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_33_in_varexpr979 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr983 = new BitSet(new long[]{0x0000000100000000L});
    public static final BitSet FOLLOW_32_in_varexpr985 = new BitSet(new long[]{0x0000000200000000L});
    public static final BitSet FOLLOW_33_in_varexpr987 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_varexpr991 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_25_in_op1009 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_34_in_op1019 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_35_in_op1028 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FOR_in_map1044 = new BitSet(new long[]{0x0000001000000000L});
    public static final BitSet FOLLOW_map_var_list_in_map1050 = new BitSet(new long[]{0x0000000000000200L});
    public static final BitSet FOLLOW_IN_in_map1056 = new BitSet(new long[]{0x0000001000400000L});
    public static final BitSet FOLLOW_dict_list_in_map1060 = new BitSet(new long[]{0x0000000210010100L});
    public static final BitSet FOLLOW_sync_in_map1065 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_36_in_map_var_list1077 = new BitSet(new long[]{0x0000000000410000L});
    public static final BitSet FOLLOW_entry_bind_in_map_var_list1079 = new BitSet(new long[]{0x0000002000800000L});
    public static final BitSet FOLLOW_23_in_map_var_list1083 = new BitSet(new long[]{0x0000000000410000L});
    public static final BitSet FOLLOW_entry_bind_in_map_var_list1085 = new BitSet(new long[]{0x0000002000800000L});
    public static final BitSet FOLLOW_37_in_map_var_list1090 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_var_in_entry_bind1103 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_22_in_entry_bind1111 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_entry_bind1115 = new BitSet(new long[]{0x0000000000800000L});
    public static final BitSet FOLLOW_23_in_entry_bind1117 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_entry_bind1121 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_entry_bind1123 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_36_in_dict_list1137 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_22_in_dict_list1143 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_dict_list1151 = new BitSet(new long[]{0x0000002001800000L});
    public static final BitSet FOLLOW_23_in_dict_list1158 = new BitSet(new long[]{0x0000000000010000L});
    public static final BitSet FOLLOW_var_in_dict_list1162 = new BitSet(new long[]{0x0000002001800000L});
    public static final BitSet FOLLOW_set_in_dict_list1170 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_var1191 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_value_ref_in_const_value1206 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_const_value_no_ref_in_const_value1213 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_boolean_value_in_const_value_no_ref1229 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_string_in_const_value_no_ref1237 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NUMBER_in_const_value_no_ref1244 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NULL_in_const_value_no_ref1251 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_36_in_const_value_no_ref1258 = new BitSet(new long[]{0x00000030000380E0L});
    public static final BitSet FOLLOW_value_list_in_const_value_no_ref1260 = new BitSet(new long[]{0x0000002000000000L});
    public static final BitSet FOLLOW_37_in_const_value_no_ref1263 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_const_value_in_value_list1283 = new BitSet(new long[]{0x0000000000800002L});
    public static final BitSet FOLLOW_23_in_value_list1290 = new BitSet(new long[]{0x00000010000380E0L});
    public static final BitSet FOLLOW_const_value_in_value_list1294 = new BitSet(new long[]{0x0000000000800002L});
    public static final BitSet FOLLOW_TRUE_in_boolean_value1313 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FALSE_in_boolean_value1320 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_NAME_in_value_ref1335 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_STRING_in_string1350 = new BitSet(new long[]{0x0000000000000002L});

}